/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:47 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class Khoahoc_HocvienEntity
    {
        public Khoahoc_HocvienEntity()
        {
            m_pk_ikhoahoc_hocvienid = 0;
			m_fk_ikhoahocid=0;
			m_fk_ihocvienid=0;
			m_itrangthai=0;
			m_sghichu="";
        }
        private Int64 m_pk_ikhoahoc_hocvienid;
        public Int64 PK_iKhoahoc_HocvienID
        {
            get { return m_pk_ikhoahoc_hocvienid; }
            set { m_pk_ikhoahoc_hocvienid = value; }
        }
		private Int64 m_fk_ikhoahocid;
		public Int64 FK_iKhoahocID
		{
			get { return m_fk_ikhoahocid ; }
			set { m_fk_ikhoahocid = value; }
		}
		private Int64 m_fk_ihocvienid;
		public Int64 FK_iHocvienID
		{
			get { return m_fk_ihocvienid ; }
			set { m_fk_ihocvienid = value; }
		}
		private Int16 m_itrangthai;
		public Int16 iTrangthai
		{
			get { return m_itrangthai ; }
			set { m_itrangthai = value; }
		}
		private String m_sghichu;
		public String sGhichu
		{
			get { return m_sghichu ; }
			set { m_sghichu = value; }
		}

        #region Comparison
        public static List<Khoahoc_HocvienEntity> Sort(List<Khoahoc_HocvienEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(Khoahoc_HocvienEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<Khoahoc_HocvienEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<Khoahoc_HocvienEntity> COMPARISON_FK_iKhoahocID
		{
			get
			{
				return delegate(Khoahoc_HocvienEntity entity,Khoahoc_HocvienEntity other)
				{
					return entity.FK_iKhoahocID.CompareTo(other.FK_iKhoahocID);
				};
			}
		}
		public static Comparison<Khoahoc_HocvienEntity> COMPARISON_FK_iHocvienID
		{
			get
			{
				return delegate(Khoahoc_HocvienEntity entity,Khoahoc_HocvienEntity other)
				{
					return entity.FK_iHocvienID.CompareTo(other.FK_iHocvienID);
				};
			}
		}
		public static Comparison<Khoahoc_HocvienEntity> COMPARISON_iTrangthai
		{
			get
			{
				return delegate(Khoahoc_HocvienEntity entity,Khoahoc_HocvienEntity other)
				{
					return entity.iTrangthai.CompareTo(other.iTrangthai);
				};
			}
		}
		public static Comparison<Khoahoc_HocvienEntity> COMPARISON_sGhichu
		{
			get
			{
				return delegate(Khoahoc_HocvienEntity entity,Khoahoc_HocvienEntity other)
				{
					return entity.sGhichu.CompareTo(other.sGhichu);
				};
			}
		}
        #endregion
    }
}
